﻿using System;
using System.Collections.Generic;

using BrightSword.SwissKnife;

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Tests.BrightSword.SwissKnife
{
    [TestClass]
    public class GetDefaultValueTests
    {
        [TestMethod]
        public void Test_GetDefaultValue()
        {
            Assert.AreEqual(default(int),
                            typeof(int).GetDefaultValue());
            Assert.AreEqual(default(Decimal),
                            typeof(Decimal).GetDefaultValue());
            Assert.AreEqual(default(Foo),
                            typeof(Foo).GetDefaultValue());
            Assert.AreEqual(default(int),
                            typeof(int).GetDefaultValue());
            Assert.AreEqual(default(Tuple<int, string>),
                            typeof(Tuple<int, string>).GetDefaultValue());
            Assert.AreEqual(default(IDictionary<string, string>),
                            typeof(IDictionary<string, string>).GetDefaultValue());
        }

        private struct Foo
        {
            private decimal Amount { get; set; }
        }
    }
}